package com.smartleanx.module.hrm.dal.mysql.examine.examineDimension;

import java.util.*;

import com.smartleanx.framework.common.pojo.PageResult;
import com.smartleanx.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.smartleanx.framework.mybatis.core.mapper.BaseMapperX;
import com.smartleanx.module.hrm.dal.dataobject.examine.examineDimension.ExamineDimensionDO;
import org.apache.ibatis.annotations.Mapper;
import com.smartleanx.module.hrm.controller.admin.examine.examineDimension.vo.*;

/**
 * 考核维度 Mapper
 *
 * @author 
 */
@Mapper
public interface ExamineDimensionMapper extends BaseMapperX<ExamineDimensionDO> {

    default PageResult<ExamineDimensionDO> selectPage(ExamineDimensionPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ExamineDimensionDO>()
                .likeIfPresent(ExamineDimensionDO::getDimensionName, reqVO.getDimensionName())
                .eqIfPresent(ExamineDimensionDO::getDimensionWeight, reqVO.getDimensionWeight())
                .eqIfPresent(ExamineDimensionDO::getExamineId, reqVO.getExamineId())
//                .betweenIfPresent(ExamineDimensionDO::getCreateTime, reqVO.getCreateTime())/**/
                .orderByDesc(ExamineDimensionDO::getId));
    }

}